package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by jjx on 2018/5/27.
 */
@Entity
@Table(name = "t_sys_role_name_2_depart", schema = "oa", catalog = "")
public class Role2DepartEntity extends BaseEntity {

    private String roleNameId;
    private String departId;

    public String getRoleNameId() {
        return roleNameId;
    }

    public void setRoleNameId(String roleNameId) {
        this.roleNameId = roleNameId;
    }

    public String getDepartId() {
        return departId;
    }

    public void setDepartId(String departId) {
        this.departId = departId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ROLE_NAME_ID",this.getRoleNameId());
        json.put("DEPART_ID",this.getDepartId());
        return json;
    }

    @Override
    public String getTableName() {
        return "t_sys_role_name_2_depart";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ROLE_NAME_ID","roleNameId");
        json.put("DEPART_ID","departId");
        return json;
    }
}
